#include <PixelUnpack.h>
Definition at line 16 of file PixelUnpack.h.
◆ PixelUnpack() [1/2]
PixelUnpack::PixelUnpack |
( |
uint16_t |
PartitionId | ) |
|
◆ ~PixelUnpack()
PixelUnpack::~PixelUnpack |
( |
| ) |
|
|
virtual |
Destructor.
Definition at line 34 of file PixelUnpack.cxx.
35{
36 LOG(INFO) << "PixelUnpack: Delete instance";
38}
◆ PixelUnpack() [2/2]
◆ DoUnpack()
Bool_t PixelUnpack::DoUnpack |
( |
Int_t * |
data, |
|
|
Int_t |
size |
|
) |
| |
|
overridevirtual |
Process an MBS sub-event.
Reimplemented from ShipUnpack.
Definition at line 59 of file PixelUnpack.cxx.
60{
61 LOG(INFO) << "PixelUnpack : Unpacking frame... size/bytes = " << size;
62
64 switch (
df->header.frameTime) {
65 case SoS: LOG(INFO) <<
"PixelUnpacker: SoS frame.";
return kTRUE;
66 case EoS: LOG(INFO) <<
"PixelUnpacker: EoS frame.";
return kTRUE;
67 default: break;
68 }
69 assert(
df->header.size == size);
71 std::vector<RawDataHit> hits(
df->hits,
df->hits + nhits);
72 for (auto &&hit : hits) {
73 auto hitData =
reinterpret_cast<HitData *
>(&(hit.hitTime));
74 auto channelId =
reinterpret_cast<ChannelId *
>(&(hit.channelId));
75 auto detectorID = (
df->header.partitionId%0x0800) * 10000000 + 1000000 * hitData->moduleID + 1000 * channelId->
row + channelId->column;
76 auto tot = hitData->tot;
77 new ((*fRawData)[
fNHits]) ShipPixelHit(detectorID, tot);
79 }
80
82 return kTRUE;
83}
integer(mpi) nhits
number of hits
◆ GetNHitsTotal()
Int_t PixelUnpack::GetNHitsTotal |
( |
| ) |
|
|
inline |
Method for controlling the functionality.
Definition at line 33 of file PixelUnpack.h.
◆ GetPartition()
uint16_t PixelUnpack::GetPartition |
( |
| ) |
|
|
inlineoverridevirtual |
◆ Init()
Bool_t PixelUnpack::Init |
( |
| ) |
|
|
overridevirtual |
Initialization. Called once, before the event loop.
Reimplemented from ShipUnpack.
Definition at line 41 of file PixelUnpack.cxx.
42{
44 return kTRUE;
45}
virtual void Register() override
◆ operator=()
◆ Register()
void PixelUnpack::Register |
( |
| ) |
|
|
overrideprotectedvirtual |
Register the output structures.
Reimplemented from ShipUnpack.
Definition at line 48 of file PixelUnpack.cxx.
49{
50 LOG(INFO) << "PixelUnpack : Registering...";
51 auto *
fMan = FairRootManager::Instance();
52 if (!fMan) {
53 return;
54 }
55 fMan->Register(
"Digi_PixelHits",
"Pixels",
fRawData, kTRUE);
56}
◆ Reset()
void PixelUnpack::Reset |
( |
| ) |
|
|
overridevirtual |
Clear the output structures.
Reimplemented from ShipUnpack.
Definition at line 86 of file PixelUnpack.cxx.
87{
88 LOG(DEBUG) << "PixelUnpack : Clearing Data Structure" ;
91}
◆ fNHits
Int_t PixelUnpack::fNHits |
|
private |
Number of raw items in current event.
Definition at line 43 of file PixelUnpack.h.
◆ fNHitsTotal
Int_t PixelUnpack::fNHitsTotal |
|
private |
◆ fPartitionId
uint16_t PixelUnpack::fPartitionId |
|
private |
◆ fRawData
TClonesArray* PixelUnpack::fRawData |
|
private |
The documentation for this class was generated from the following files: