@@ -48,43 +48,43 @@ enum class TimeStampMode {
4848
4949// configuration struct (which can be passed around)
5050struct SimConfigData {
51- std::vector<std::string> mActiveModules ; // list of active modules
52- std::vector<std::string> mReadoutDetectors ; // list of readout detectors
53- std::string mMCEngine ; // chosen VMC engine
54- std::string mGenerator ; // chosen VMC generator
55- std::string mTrigger ; // chosen VMC generator trigger
56- unsigned int mNEvents ; // number of events to be simulated
57- std::string mExtKinFileName ; // file name of external kinematics file (needed for ext kinematics generator)
58- std::string mEmbedIntoFileName ; // filename containing the reference events to be used for the embedding
59- unsigned int mStartEvent ; // index of first event to be taken
60- float mBMax ; // maximum for impact parameter sampling
61- bool mIsMT ; // chosen MT mode (Geant4 only)
62- std::string mOutputPrefix ; // prefix to be used for output files
63- std::string mLogSeverity ; // severity for FairLogger
64- std::string mLogVerbosity ; // loglevel for FairLogger
65- std::string mKeyValueTokens ; // a string holding arbitrary sequence of key-value tokens
66- // Foo.parameter1=x,Bar.parameter2=y,Baz.paramter3=hello
67- // (can be used to **loosely** change any configuration parameter from command-line)
68- std::string mConfigFile ; // path to a JSON or INI config file (file extension is required to determine type).
69- // values within the config file will override values set in code by the param classes
70- // but will themselves be overridden by any values given in mKeyValueTokens.
71- int mPrimaryChunkSize ; // defining max granularity for input primaries of a sim job
72- int mInternalChunkSize ; //
73- ULong_t mStartSeed ; // base for random number seeds
74- int mSimWorkers = 1 ; // number of parallel sim workers (when it applies)
75- bool mFilterNoHitEvents = false ; // whether to filter out events not leaving any response
76- std::string mCCDBUrl ; // the URL where to find CCDB
77- uint64_t mTimestamp ; // timestamp in ms to anchor transport simulation to
51+ std::vector<std::string> mActiveModules ; // list of active modules
52+ std::vector<std::string> mReadoutDetectors ; // list of readout detectors
53+ std::string mMCEngine ; // chosen VMC engine
54+ std::string mGenerator ; // chosen VMC generator
55+ std::string mTrigger ; // chosen VMC generator trigger
56+ unsigned int mNEvents ; // number of events to be simulated
57+ std::string mExtKinFileName ; // file name of external kinematics file (needed for ext kinematics generator)
58+ std::string mEmbedIntoFileName ; // filename containing the reference events to be used for the embedding
59+ unsigned int mStartEvent ; // index of first event to be taken
60+ float mBMax ; // maximum for impact parameter sampling
61+ bool mIsMT ; // chosen MT mode (Geant4 only)
62+ std::string mOutputPrefix ; // prefix to be used for output files
63+ std::string mLogSeverity ; // severity for FairLogger
64+ std::string mLogVerbosity ; // loglevel for FairLogger
65+ std::string mKeyValueTokens ; // a string holding arbitrary sequence of key-value tokens
66+ // Foo.parameter1=x,Bar.parameter2=y,Baz.paramter3=hello
67+ // (can be used to **loosely** change any configuration parameter from command-line)
68+ std::string mConfigFile ; // path to a JSON or INI config file (file extension is required to determine type).
69+ // values within the config file will override values set in code by the param classes
70+ // but will themselves be overridden by any values given in mKeyValueTokens.
71+ unsigned int mPrimaryChunkSize ; // defining max granularity for input primaries of a sim job
72+ int mInternalChunkSize ; //
73+ ULong_t mStartSeed ; // base for random number seeds
74+ int mSimWorkers = 1 ; // number of parallel sim workers (when it applies)
75+ bool mFilterNoHitEvents = false ; // whether to filter out events not leaving any response
76+ std::string mCCDBUrl ; // the URL where to find CCDB
77+ uint64_t mTimestamp ; // timestamp in ms to anchor transport simulation to
7878 TimeStampMode mTimestampMode = TimeStampMode::kNow ; // telling of timestamp was given as option or defaulted to now
79- int mRunNumber = -1 ; // ALICE run number (if set != -1); the timestamp should be compatible
80- int mField ; // L3 field setting in kGauss: +-2,+-5 and 0
81- SimFieldMode mFieldMode = SimFieldMode::kDefault ; // uniform magnetic field
82- bool mAsService = false ; // if simulation should be run as service/deamon (does not exit after run)
83- bool mNoGeant = false ; // if Geant transport should be turned off (when one is only interested in the generated events)
84- bool mIsUpgrade = false ; // true if the simulation is for Run 5
85- std::string mFromCollisionContext = " " ; // string denoting a collision context file; If given, this file will be used to determine number of events
86- bool mForwardKine = false ; // true if tracks and event headers are to be published on a FairMQ channel (for reading by other consumers)
87- bool mWriteToDisc = true ; // whether we write simulation products (kine, hits) to disc
79+ int mRunNumber = -1 ; // ALICE run number (if set != -1); the timestamp should be compatible
80+ int mField ; // L3 field setting in kGauss: +-2,+-5 and 0
81+ SimFieldMode mFieldMode = SimFieldMode::kDefault ; // uniform magnetic field
82+ bool mAsService = false ; // if simulation should be run as service/deamon (does not exit after run)
83+ bool mNoGeant = false ; // if Geant transport should be turned off (when one is only interested in the generated events)
84+ bool mIsUpgrade = false ; // true if the simulation is for Run 5
85+ std::string mFromCollisionContext = " " ; // string denoting a collision context file; If given, this file will be used to determine number of events
86+ bool mForwardKine = false ; // true if tracks and event headers are to be published on a FairMQ channel (for reading by other consumers)
87+ bool mWriteToDisc = true ; // whether we write simulation products (kine, hits) to disc
8888 VertexMode mVertexMode = VertexMode::kDiamondParam ; // by default we should use die InteractionDiamond parameter
8989
9090 ClassDefNV (SimConfigData, 4 );
@@ -140,6 +140,7 @@ class SimConfig
140140 // static helper functions to determine list of active / readout modules
141141 // can also be used from outside
142142 static void determineActiveModules (std::vector<std::string> const & input, std::vector<std::string> const & skipped, std::vector<std::string>& active, bool isUpgrade = false );
143+ static bool determineActiveModulesList (const std::string& version, std::vector<std::string> const & input, std::vector<std::string> const & skipped, std::vector<std::string>& active);
143144 static void determineReadoutDetectors (std::vector<std::string> const & active, std::vector<std::string> const & enabledRO, std::vector<std::string> const & skippedRO, std::vector<std::string>& finalRO);
144145
145146 // helper to parse field option
@@ -179,6 +180,9 @@ class SimConfig
179180 private:
180181 SimConfigData mConfigData ; // !
181182
183+ // Filter out skipped elements in the list
184+ static bool filterSkippedElements (std::vector<std::string>& elements, std::vector<std::string> const & skipped);
185+
182186 // adjust/overwrite some option settings when collision context is used
183187 void adjustFromCollContext (std::string const & collcontextfile, std::string const & prefix);
184188
@@ -206,9 +210,9 @@ struct SimReconfigData {
206210 std::string configFile; // path to a JSON or INI config file (file extension is required to determine type).
207211 // values within the config file will override values set in code by the param classes
208212 // but will themselves be overridden by any values given in mKeyValueTokens.
209- unsigned int primaryChunkSize; // defining max granularity for input primaries of a sim job
210- ULong_t startSeed; // base for random number seeds
211- bool stop; // to shut down the service
213+ unsigned int primaryChunkSize; // defining max granularity for input primaries of a sim job
214+ ULong_t startSeed; // base for random number seeds
215+ bool stop; // to shut down the service
212216 std::string mFromCollisionContext = " " ; // string denoting a collision context file; If given, this file will be used to determine number of events
213217
214218 ClassDefNV (SimReconfigData, 1 );
0 commit comments