CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DCCDataBlockPrototype.h
Go to the documentation of this file.
1 #ifndef DCCDATABLOCKPROTOTYPE_HH
2 #define DCCDATABLOCKPROTOTYPE_HH
3 
4 /*
5  * \class DCCDataBlockPrototype
6  * Prototype for ECAL data block unpacking
7  * \file DCCDataBlockPrototype.h
8  *
9  * \author N. Almeida
10  *
11 */
12 
13 
14 #include <iostream>
15 #include <string>
16 #include <vector>
17 #include <map>
18 #include <utility>
19 #include <stdio.h>
20 
22 #include "DCCRawDataDefinitions.h"
23 #include <stdint.h>
24 
26 class DCCDataUnpacker;
27 class DCCEventBlock;
28 
30 
31  public :
36 
37  virtual ~DCCDataBlockPrototype() {};
38 
39  virtual int unpack(const uint64_t ** data, unsigned int * dwToEnd){ return BLOCK_UNPACKED;}
40 
41  virtual void updateCollectors(){};
42 
43  virtual void display(std::ostream & o){}
44 
45  void enableSyncChecks(){sync_=true;}
46 
50  virtual void updateEventPointers(){
51 
52  //cout<<"\n block Length "<<blockLength_;
53  //cout<<"\n dwToEne... "<<*dwToEnd_;
54 
55  *datap_ += blockLength_;
56 
57  // preventing pointers from navigating wildly outside of fedBlock
58  if((*dwToEnd_)>=blockLength_)
60  else
61  *dwToEnd_ = 0;
62 
63  }
64 
65  virtual unsigned int getLength(){ return blockLength_; }
66 
67 
68  protected :
70  bool error_;
73 
74 
75  const uint64_t ** datap_;
76  const uint64_t * data_;
77  unsigned int * dwToEnd_;
78 
79 
80  unsigned int blockLength_;
82  bool sync_;
83 
84 };
85 
86 #endif
virtual void display(std::ostream &o)
virtual unsigned int getLength()
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
unsigned long long uint64_t
Definition: Time.h:15
DCCDataUnpacker * unpacker_
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
virtual int unpack(const uint64_t **data, unsigned int *dwToEnd)
virtual void updateEventPointers()
EcalElectronicsMapper * mapper_
DCCDataBlockPrototype(DCCDataUnpacker *unpacker, EcalElectronicsMapper *mapper, DCCEventBlock *event, bool unpack=true)