39 mFirstEntry = ic.
options().
get<
int>(
"first-entry");
40 mLastEntry = ic.
options().
get<
int>(
"last-entry");
41 mFile.reset(TFile::Open(
filename.c_str()));
42 if (!mFile->IsOpen()) {
44 throw std::runtime_error(
"cannot open input digits file");
46 mTree.reset((TTree*)mFile->Get(
"o2sim"));
49 throw std::runtime_error(
"Did not fine o2sim file in ZDC digits tree");
56 std::vector<o2::zdc::OrbitData> zdcOrbitData, *zdcOrbitDataPtr = &zdcOrbitData;
57 std::vector<o2::zdc::BCData> zdcBCData, *zdcBCDataPtr = &zdcBCData;
58 std::vector<o2::zdc::ChannelData> zdcChData, *zdcChDataPtr = &zdcChData;
60 mTree->SetBranchAddress(
"ZDCDigitOrbit", &zdcOrbitDataPtr);
61 mTree->SetBranchAddress(
"ZDCDigitBC", &zdcBCDataPtr);
62 mTree->SetBranchAddress(
"ZDCDigitCh", &zdcChDataPtr);
65 mTree->SetBranchAddress(
"ZDCDigitLabels", &plabels);
68 auto ent = mTree->GetReadEntry() < 0 ? mTree->GetReadEntry() + mFirstEntry + 1 : mTree->GetReadEntry() + 1;
74 const bool noEntry = ent >= mTree->GetEntries();
76 LOG(info) <<
"no entry to read, publishing empty output";
80 LOG(info) <<
"ZDCDigitReader pushed " << zdcOrbitData.size() <<
" orbits with " << zdcBCData.size() <<
" bcs and " << zdcChData.size() <<
" digits";
87 uint64_t nextEntry = mTree->GetReadEntry() + 1;
88 if (noEntry || nextEntry >= mTree->GetEntries() || (mLastEntry >= 0 && nextEntry > mLastEntry)) {
96 std::vector<OutputSpec> outputs;
97 outputs.emplace_back(
"ZDC",
"DIGITSBC", 0, Lifetime::Timeframe);
98 outputs.emplace_back(
"ZDC",
"DIGITSCH", 0, Lifetime::Timeframe);
99 outputs.emplace_back(
"ZDC",
"DIGITSPD", 0, Lifetime::Timeframe);
101 outputs.emplace_back(
"ZDC",
"DIGITSLBL", 0, Lifetime::Timeframe);
109 {
"zdc-digit-infile", VariantType::String,
"zdcdigits.root", {
"Name of the input file"}},
110 {
"input-dir", VariantType::String,
"none", {
"Input directory"}},
Class to describe fired triggered and/or stored channels for the BC and to refer to channel data.
Timeframe settings Average distance in cm of events merged into Randomize distance around average distance of merged events Simulate correct bunch interactions instead of placing only the average number of events A value[n] sets TFlen for[n] collisions in Number of bunches per trainsort Number of bunch trains Instantaneous interaction rate Do not simulate border Total number of collisions to be placed in the interior of all time Do not select random but walk over array of events in stride steps h Event generator settings h configStandalone Use CPU for GPU Force usage of the specified GPU device no CPU fallback Continue processing after an error First event to Number of events to Number of iterations to Number of iterations to Number of initial iterations excluded from const char Directory with events to Events directory is and not inside events Show standalone event Run event generator maximum time bin of continuous for triggered for automatic continuous for automatic continuous triggered uint64_t
char error[CURL_ERROR_SIZE]
std::vector< o2::MCCompLabel > labels
Definition of a container to keep Monte Carlo truth external to simulation objects.
Definition of the Names Generator class.
Class to describe pedestal data accumulated over the orbit.
T get(const char *key) const
void snapshot(const Output &spec, T const &object)
ConfigParamRegistry const & options()
DataAllocator & outputs()
The data allocator is used to allocate memory for the output data.
ServiceRegistryRef services()
The services registry associated with this processing context.
virtual void endOfStream(EndOfStreamContext &context)
This is invoked whenever we have an EndOfStream event.
void run(framework::ProcessingContext &pc) final
void init(framework::InitContext &ic) final
Defining ITS Vertex explicitly as messageable.
std::vector< InputSpec > Inputs
struct o2::upgrades_utils::@482 zdc
structure to keep FT0 information
framework::DataProcessorSpec getDigitReaderSpec(bool useMC)
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
static std::string rectifyDirectory(const std::string_view p)
static std::string concat_string(Ts const &... ts)
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"