Skip to content
Snippets Groups Projects
Commit cd368d65 authored by zoujh@ihep.ac.cn's avatar zoujh@ihep.ac.cn
Browse files

Merge branch 'master' into 'master'

LCIO2plcio convertor

See merge request cepc-prototype/CEPCSW!12
parents 61a489ef 3bbf046f
No related branches found
No related tags found
No related merge requests found
...@@ -3,7 +3,8 @@ ...@@ -3,7 +3,8 @@
from Gaudi.Configuration import * from Gaudi.Configuration import *
from Configurables import LCIODataSvc from Configurables import LCIODataSvc
dsvc = LCIODataSvc("EventDataSvc", input="/cefs/data/FullSim/CEPC240/CEPC_v4/higgs/E240.Pe2e2h_bb.e0.p0.whizard195/e2e2h_bb.e0.p0.00001_000000_sim.slcio") # dsvc = LCIODataSvc("EventDataSvc", input="/cefs/data/FullSim/CEPC240/CEPC_v4/higgs/E240.Pe2e2h_bb.e0.p0.whizard195/e2e2h_bb.e0.p0.00001_000000_sim.slcio")
dsvc = LCIODataSvc("EventDataSvc", input="/cefs/data/DstData/CEPC240/CEPC_v4/higgs/E240.Pe2e2h_X.e0.p0.whizard195/e2e2h_X.e0.p0.00001_001000_dst.slcio")
from Configurables import PlcioReadAlg from Configurables import PlcioReadAlg
alg = PlcioReadAlg("PlcioReadAlg") alg = PlcioReadAlg("PlcioReadAlg")
......
This diff is collapsed.
...@@ -9,15 +9,35 @@ ...@@ -9,15 +9,35 @@
#include "lcio.h" #include "lcio.h"
// #include "IO/LCReader.h" // #include "IO/LCReader.h"
// #include "EVENT/LCCollection.h" // #include "EVENT/LCCollection.h"
#include "EVENT/MCParticle.h" #include "EVENT/Vertex.h"
#include "EVENT/SimTrackerHit.h" #include "EVENT/SimTrackerHit.h"
#include "EVENT/SimCalorimeterHit.h"
#include "plcio/SimTrackerHit.h" #include "plcio/SimTrackerHit.h"
#include "plcio/SimTrackerHitCollection.h" #include "plcio/SimTrackerHitCollection.h"
#include "EVENT/SimCalorimeterHit.h"
#include "plcio/SimCalorimeterHit.h" #include "plcio/SimCalorimeterHit.h"
#include "plcio/SimCalorimeterHitCollection.h" #include "plcio/SimCalorimeterHitCollection.h"
#include "EVENT/MCParticle.h"
#include "plcio/MCParticle.h" #include "plcio/MCParticle.h"
#include "plcio/MCParticleCollection.h" #include "plcio/MCParticleCollection.h"
#include "plcio/VertexCollection.h"
#include "EVENT/TPCHit.h"
#include "plcio/TPCHit.h"
#include "plcio/TPCHitCollection.h"
#include "EVENT/Cluster.h"
#include "plcio/Cluster.h"
#include "plcio/ClusterCollection.h"
#include "EVENT/ParticleID.h"
#include "EVENT/CalorimeterHit.h"
#include "plcio/CalorimeterHit.h"
#include "podio/CollectionIDTable.h"
#include "EVENT/Track.h"
#include "EVENT/TrackerHit.h"
#include "EVENT/TrackState.h"
#include "plcio/Track.h"
#include "plcio/TrackCollection.h"
#include "EVENT/ReconstructedParticle.h"
#include "plcio/ReconstructedParticle.h"
#include "plcio/ReconstructedParticleCollection.h"
#include <utility> #include <utility>
// Forward declarations // Forward declarations
...@@ -53,16 +73,21 @@ public: ...@@ -53,16 +73,21 @@ public:
static podio::CollectionBase* Convertor_LCRunHeader(EVENT::LCCollection*); static podio::CollectionBase* Convertor_LCRunHeader(EVENT::LCCollection*);
static podio::CollectionBase* Convertor_SimTrackerHit(EVENT::LCCollection*); static podio::CollectionBase* Convertor_SimTrackerHit(EVENT::LCCollection*);
static podio::CollectionBase* Convertor_SimCalorimeterHit(EVENT::LCCollection*); static podio::CollectionBase* Convertor_SimCalorimeterHit(EVENT::LCCollection*);
static podio::CollectionBase* Convertor_Cluster(EVENT::LCCollection*);
static podio::CollectionBase* Convertor_Track(EVENT::LCCollection*);
static podio::CollectionBase* Convertor_ReconstructedParticle(EVENT::LCCollection*);
static podio::CollectionBase* Convertor_LCRelation(EVENT::LCCollection*);
static podio::CollectionBase* Convertor_Vertex(EVENT::LCCollection*);
static podio::CollectionBase* Convertor_TPCHit(EVENT::LCCollection*);
static void void_Core_MCParticle(EVENT::MCParticle*, plcio::MCParticle&); static void setMCParticle(EVENT::MCParticle*, plcio::MCParticle&);
static plcio::MCParticleCollection* Core_MCParticle(EVENT::LCCollection*); void setCollName(const std::string &collName){ CollName = collName; };
bool isReady(const std::string&); bool isReady(const std::string&);
void setPlcioMCParticleCollection(plcio::MCParticleCollection*);
void setLCIOMCParticleCollection(EVENT::LCCollection*);
private: private:
std::string TypeName; std::string TypeName;
static std::string CollName;
// maintain a log vec about data read; // maintain a log vec about data read;
std::vector<std::string> vec_Types; std::vector<std::string> vec_Types;
......
...@@ -158,6 +158,7 @@ StatusCode LCIODataSvc::readCollection(const std::string& collName, int collecti ...@@ -158,6 +158,7 @@ StatusCode LCIODataSvc::readCollection(const std::string& collName, int collecti
// LCIO2Plcio::setLCIOMCParticleCollection(mcpcol_lc); // LCIO2Plcio::setLCIOMCParticleCollection(mcpcol_lc);
// LCIO2Plcio::setPlcioMCParticleCollection(mcpcol_pl); // LCIO2Plcio::setPlcioMCParticleCollection(mcpcol_pl);
// } // }
cvtor.setCollName(collName);
collection = cvtor.Convertor_getPlcio( lc_col ); collection = cvtor.Convertor_getPlcio( lc_col );
pl_evtcol->at(0)->addCollectionName(collName); pl_evtcol->at(0)->addCollectionName(collName);
pl_evtcol->at(0)->addCollectionType(TypeName); pl_evtcol->at(0)->addCollectionType(TypeName);
......
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