Skip to content
Snippets Groups Projects
Commit e9d47ae9 authored by Cao Guangjie's avatar Cao Guangjie
Browse files

Recovery of PlcioReadAlg & Update config python file

parent b76a2ab2
No related branches found
No related tags found
No related merge requests found
......@@ -7,9 +7,12 @@ dsvc = LCIODataSvc("EventDataSvc", input="/cefs/data/FullSim/CEPC240/CEPC_v4/hig
from Configurables import PlcioReadAlg
alg = PlcioReadAlg("PlcioReadAlg")
alg.InputCol.Path = "MCParticle"
alg.HeaderCol.Path = "EventHeader"
from Configurables import LCIOInput
lcioinput = LCIOInput("LCIOReader", collections=[
"EventHeader",
"MCParticle",
"COILCollection",
"EcalBarrelSiliconCollection",
......
......@@ -7,7 +7,7 @@ dsvc = CEPCDataSvc("EventDataSvc")
from Configurables import PlcioWriteAlg
alg = PlcioWriteAlg("PlcioWriteAlg")
alg.OutputCol.Path = "MCParticleCol"
alg.OutputCol.Path = "MCParticle"
from Configurables import PodioOutput
out = PodioOutput("out")
......
#include "PlcioReadAlg.h"
#include "plcio/EventHeaderCollection.h"
#include "plcio/MCParticleCollection.h"
DECLARE_COMPONENT(PlcioReadAlg)
......@@ -6,7 +7,8 @@ DECLARE_COMPONENT(PlcioReadAlg)
PlcioReadAlg::PlcioReadAlg(const std::string& name, ISvcLocator* svcLoc)
: GaudiAlgorithm(name, svcLoc)
{
declareProperty("MCParticleCol", m_hdl, "MCParticle collection (input)");
declareProperty("HeaderCol", m_headerCol);
declareProperty("InputCol", m_mcParCol, "MCParticle collection (input)");
}
StatusCode PlcioReadAlg::initialize()
......@@ -18,19 +20,21 @@ StatusCode PlcioReadAlg::initialize()
StatusCode PlcioReadAlg::execute()
{
debug() << "begin execute PlcioReadAlg" << endmsg;
auto mcCol = m_hdl.get();
// debug() << "testing loop..." <<endmsg;
auto headers = m_headerCol.get();
auto header = headers->at(0);
auto mcCol = m_mcParCol.get();
info() << "Run " << header.getRunNumber() << " Event " << header.getEventNumber() << " { ";
for ( auto p : *mcCol ) {
debug() << p.getObjectID().index << " : [";
info() << p.getObjectID().index << " : [";
for ( auto it = p.daughters_begin(), end = p.daughters_end(); it != end; ++it ) {
debug() << " " << it->getObjectID().index;
info() << " " << it->getObjectID().index;
}
debug() << " ]; ";
info() << " ]; ";
}
debug() << endmsg;
info() << "}" << endmsg;
// debug() << "end execute PlcioReadAlg" << endmsg;
return StatusCode::SUCCESS;
}
......
......@@ -5,6 +5,7 @@
#include "GaudiAlg/GaudiAlgorithm.h"
namespace plcio {
class EventHeaderCollection;
class MCParticleCollection;
}
......@@ -22,7 +23,8 @@ class PlcioReadAlg : public GaudiAlgorithm
private :
DataHandle<plcio::MCParticleCollection> m_hdl{"MCParticle", Gaudi::DataHandle::Reader, this};
DataHandle<plcio::EventHeaderCollection> m_headerCol{"EventHeaderCol", Gaudi::DataHandle::Reader, this};
DataHandle<plcio::MCParticleCollection> m_mcParCol{"MCParticleCol", Gaudi::DataHandle::Reader, this};
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment