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 ...@@ -7,9 +7,12 @@ dsvc = LCIODataSvc("EventDataSvc", input="/cefs/data/FullSim/CEPC240/CEPC_v4/hig
from Configurables import PlcioReadAlg from Configurables import PlcioReadAlg
alg = PlcioReadAlg("PlcioReadAlg") alg = PlcioReadAlg("PlcioReadAlg")
alg.InputCol.Path = "MCParticle"
alg.HeaderCol.Path = "EventHeader"
from Configurables import LCIOInput from Configurables import LCIOInput
lcioinput = LCIOInput("LCIOReader", collections=[ lcioinput = LCIOInput("LCIOReader", collections=[
"EventHeader",
"MCParticle", "MCParticle",
"COILCollection", "COILCollection",
"EcalBarrelSiliconCollection", "EcalBarrelSiliconCollection",
......
...@@ -7,7 +7,7 @@ dsvc = CEPCDataSvc("EventDataSvc") ...@@ -7,7 +7,7 @@ dsvc = CEPCDataSvc("EventDataSvc")
from Configurables import PlcioWriteAlg from Configurables import PlcioWriteAlg
alg = PlcioWriteAlg("PlcioWriteAlg") alg = PlcioWriteAlg("PlcioWriteAlg")
alg.OutputCol.Path = "MCParticleCol" alg.OutputCol.Path = "MCParticle"
from Configurables import PodioOutput from Configurables import PodioOutput
out = PodioOutput("out") out = PodioOutput("out")
......
#include "PlcioReadAlg.h" #include "PlcioReadAlg.h"
#include "plcio/EventHeaderCollection.h"
#include "plcio/MCParticleCollection.h" #include "plcio/MCParticleCollection.h"
DECLARE_COMPONENT(PlcioReadAlg) DECLARE_COMPONENT(PlcioReadAlg)
...@@ -6,7 +7,8 @@ DECLARE_COMPONENT(PlcioReadAlg) ...@@ -6,7 +7,8 @@ DECLARE_COMPONENT(PlcioReadAlg)
PlcioReadAlg::PlcioReadAlg(const std::string& name, ISvcLocator* svcLoc) PlcioReadAlg::PlcioReadAlg(const std::string& name, ISvcLocator* svcLoc)
: GaudiAlgorithm(name, 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() StatusCode PlcioReadAlg::initialize()
...@@ -18,19 +20,21 @@ StatusCode PlcioReadAlg::initialize() ...@@ -18,19 +20,21 @@ StatusCode PlcioReadAlg::initialize()
StatusCode PlcioReadAlg::execute() StatusCode PlcioReadAlg::execute()
{ {
debug() << "begin execute PlcioReadAlg" << endmsg; 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 ) { 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 ) { 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; return StatusCode::SUCCESS;
} }
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
#include "GaudiAlg/GaudiAlgorithm.h" #include "GaudiAlg/GaudiAlgorithm.h"
namespace plcio { namespace plcio {
class EventHeaderCollection;
class MCParticleCollection; class MCParticleCollection;
} }
...@@ -22,7 +23,8 @@ class PlcioReadAlg : public GaudiAlgorithm ...@@ -22,7 +23,8 @@ class PlcioReadAlg : public GaudiAlgorithm
private : 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