38 mCaloAmp = 0xFFFFFFFF;
39 mCaloTime = 0xFFFFFFFF;
41 mTFNumber = ic.
options().
get<int64_t>(
"aod-timeframe-id");
42 mRunNumber = ic.
options().
get<
int>(
"run-number");
47 auto cput = mTimer.CpuTime();
52 if (mTFNumber == -1L) {
58 const int runNumber = (mRunNumber == -1) ?
int(tinfo.runNumber) : mRunNumber;
63 LOG(info) <<
"FOUND " << cellsIn.size() <<
" EMC cells in CTF";
64 LOG(info) <<
"FOUND " << triggersIn.size() <<
" EMC tiggers in CTF";
73 auto caloCellsCursor = caloCellsBuilder->
cursor<o2::aod::Calos>();
74 auto caloCellsTRGTableCursor = caloCellsTRGTableBuilder->
cursor<o2::aod::CaloTriggers>();
77 mCaloEventHandler->
reset();
78 mCaloEventHandler->
setCellData(cellsIn, triggersIn);
80 uint64_t triggerMask = 1, inputMask = 1;
84 auto cellsInEvent = inputEvent.
mCells;
87 LOG(info) <<
"Found " << cellsInEvent.size() <<
" cells in event";
89 auto bcID = interactionRecord.
toLong();
97 for (
auto& cell : cellsInEvent) {
103 o2::math_utils::detail::truncateFloatFraction(cell.getAmplitude(), mCaloAmp),
104 o2::math_utils::detail::truncateFloatFraction(cell.getTimeStamp(), mCaloTime),
110 caloCellsTRGTableCursor(0,
146 LOGF(info,
"EMCAL Standalone AOD Producer total timing: Cpu: %.3e Real: %.3e s in %d slots",
147 mTimer.CpuTime(), mTimer.RealTime(), mTimer.Counter() - 1);
152 std::vector<OutputSpec> outputs;
153 outputs.emplace_back(
OutputLabel{
"O2bc"},
"AOD",
"BC", 0, Lifetime::Timeframe);
154 outputs.emplace_back(
OutputLabel{
"O2collision"},
"AOD",
"COLLISION", 0, Lifetime::Timeframe);
155 outputs.emplace_back(
OutputLabel{
"O2caloCell"},
"AOD",
"CALO", 0, Lifetime::Timeframe);
156 outputs.emplace_back(
OutputLabel{
"O2caloCellTRGR"},
"AOD",
"CALOTRIGGER", 0, Lifetime::Timeframe);
157 outputs.emplace_back(
OutputSpec{
"TFN",
"TFNumber"});
158 outputs.emplace_back(
OutputSpec{
"TFF",
"TFFilename"});
161 "standalone-aod-producer-workflow",
168 ConfigParamSpec{
"run-number", VariantType::Int64, -1L, {
"The run-number. If left default we try to get it from DPL header."}},
169 ConfigParamSpec{
"aod-timeframe-id", VariantType::Int64, -1L, {
"Set timeframe number"}}}};
General auxilliary methods.
Convert CTF (EncodedBlocks) to AO2D EMCal standalone.
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
Handler for EMCAL event data.
EventData< CellInputType > buildEvent(int eventID) const
Build event information for a given event number within the timeframe.
void reset()
Reset containers with empty ranges.
void setCellData(CellRange cells, TriggerRange triggers)
Setting the data at cell level.
int getNumberOfEvents() const
Get the number of events handled by the event handler.
void run(o2::framework::ProcessingContext &pc) final
StandaloneAODProducerSpec()
void endOfStream(o2::framework::EndOfStreamContext &ec) final
This is invoked whenever we have an EndOfStream event.
static const char * getCellTriggerRecordBinding()
void init(o2::framework::InitContext &ic) final
static const char * getCellBinding()
T get(const char *key) const
void snapshot(const Output &spec, T const &object)
decltype(auto) make(const Output &spec, Args... args)
ConfigParamRegistry const & options()
DataAllocator & outputs()
The data allocator is used to allocate memory for the output data.
InputRecord & inputs()
The inputs associated with this processing context.
ServiceRegistryRef services()
The services registry associated with this processing context.
Collisions_001 Collisions
framework::DataProcessorSpec getStandaloneAODProducerSpec()
create a processor spec
Defining ITS Vertex explicitly as messageable.
std::vector< InputSpec > Inputs
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
EMCAL event information (per trigger)
gsl::span< const InputType > mCells
EMCAL cells / digits.
InteractionRecord mInteractionRecord
Interaction record for the trigger corresponding to this event.
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"