Public Member Functions | Protected Member Functions | List of all members
daqdataformats::VERSION_NAMESPACE::RawMicroSliceHeader Class Reference

#include "/cvmfs/nova-development.opensciencegrid.org/novasoft/releases/N20-12-01/DAQDataFormats/cxx/include/RawMicroSliceHeaderV0.h"

Inheritance diagram for daqdataformats::VERSION_NAMESPACE::RawMicroSliceHeader:

Public Member Functions

 RawMicroSliceHeader (const version_t)
 
 RawMicroSliceHeader (const RawMicroSliceHeader &)
 
 ~RawMicroSliceHeader ()
 Destructor. More...
 
void init ()
 
void initSoft ()
 initing without setting the version field More...
 
void print (std::ostream &os=std::cout) const
 
uint32_t sizeofdata () const
 
voidreadData (const void *pointer)
 
 IMPLEMENT_GET_AND_SET_BOOL (DataPresent)
 
 IMPLEMENT_GET_AND_SET_BOOL (MonteCarloFlag)
 
 IMPLEMENT_GET_AND_SET_BOOL (Timeout)
 
 IMPLEMENT_GET (Version, uint32_t)
 
 IMPLEMENT_GET_AND_SET (ByteCount, uint32_t)
 
bool addByteCount (const uint32_t)
 
bool resetByteCount ()
 
uint32_t getMicroSliceSize () const
 
virtual bool setVersion (const version_t)
 
 RawMicroSliceHeader (const version_t)
 
 RawMicroSliceHeader (const RawMicroSliceHeader &)
 
 ~RawMicroSliceHeader ()
 Destructor. More...
 
void print (std::ostream &os=std::cout) const
 
 IMPLEMENT_GET (Status, uint32_t)
 
 IMPLEMENT_SET (Status, uint32_t)
 

Protected Member Functions

 IMPLEMENT_FIRST_GET_AND_SET (Extra, uint32_t)
 
 INIT_FIRST_GET_AND_SET (Status, uint32_t)
 

Detailed Description

Definition at line 57 of file RawMicroSliceHeaderV0.h.

Constructor & Destructor Documentation

daqdataformats::VERSION_NAMESPACE::RawMicroSliceHeader::RawMicroSliceHeader ( const version_t  version)

Definition at line 23 of file RawMicroSliceHeaderV0.cpp.

23  :
24  PREVIOUS_VERSION_CLASS_NAME(version, (sizeofdata_t) &RawMicroSliceHeader::sizeofdata) ///< it is assumed that the size of data is the same
25  ,ZEROOUT_GET_AND_SET (Extra)
26  ,ZEROOUT_GET_AND_SET (Status)
27 {}
#define sizeofdata_t
Definition: FunctionBind.h:30
#define ZEROOUT_GET_AND_SET(FUNC)
Definition: FunctionBind.h:56
const XML_Char * version
Definition: expat.h:187
daqdataformats::VERSION_NAMESPACE::RawMicroSliceHeader::RawMicroSliceHeader ( const RawMicroSliceHeader copyin)

Definition at line 30 of file RawMicroSliceHeaderV0.cpp.

30  :
31  PREVIOUS_VERSION_CLASS_NAME(copyin)
32  ,DEEPCOPY_GET_AND_SET (Extra)
33  ,DEEPCOPY_GET_AND_SET (Status)
34 {}
#define DEEPCOPY_GET_AND_SET(FUNC)
Definition: FunctionBind.h:44
daqdataformats::VERSION_NAMESPACE::RawMicroSliceHeader::~RawMicroSliceHeader ( )

Destructor.

Definition at line 37 of file RawMicroSliceHeaderV0.cpp.

37 { }
daqdataformats::VERSION_NAMESPACE::RawMicroSliceHeader::RawMicroSliceHeader ( const version_t  )
daqdataformats::VERSION_NAMESPACE::RawMicroSliceHeader::RawMicroSliceHeader ( const RawMicroSliceHeader )
daqdataformats::VERSION_NAMESPACE::RawMicroSliceHeader::~RawMicroSliceHeader ( )

Destructor.

Member Function Documentation

bool daqdataformats::VERSION_NAMESPACE::RawMicroSliceHeader::addByteCount ( const uint32_t  nbytes)

Definition at line 60 of file RawMicroSliceHeaderV0.cpp.

61 {
62  setByteCount(getByteCount() + nbytes);
63  return setDataPresent(true);
64 }
Long64_t nbytes
uint32_t daqdataformats::VERSION_NAMESPACE::RawMicroSliceHeader::getMicroSliceSize ( ) const

Definition at line 74 of file RawMicroSliceHeaderV0.cpp.

References GENERATE_FUNCTION_IS_NOT_ALLOWED, and sizeofdata().

75 {
76  return sizeofdata() + getByteCount() / 4;
77 }
daqdataformats::VERSION_NAMESPACE::RawMicroSliceHeader::IMPLEMENT_FIRST_GET_AND_SET ( Extra  ,
uint32_t   
)
protected

These methods are different for different versions of the MicroSlice header

daqdataformats::VERSION_NAMESPACE::RawMicroSliceHeader::IMPLEMENT_GET ( Status  ,
uint32_t   
)
daqdataformats::VERSION_NAMESPACE::RawMicroSliceHeader::IMPLEMENT_GET ( Version  ,
uint32_t   
)
daqdataformats::VERSION_NAMESPACE::RawMicroSliceHeader::IMPLEMENT_GET_AND_SET ( ByteCount  ,
uint32_t   
)
daqdataformats::VERSION_NAMESPACE::RawMicroSliceHeader::IMPLEMENT_GET_AND_SET_BOOL ( DataPresent  )

CAUTION!!!!! It is assume that these methods will be the same for all versions of MicroSlice Header

daqdataformats::VERSION_NAMESPACE::RawMicroSliceHeader::IMPLEMENT_GET_AND_SET_BOOL ( MonteCarloFlag  )
daqdataformats::VERSION_NAMESPACE::RawMicroSliceHeader::IMPLEMENT_GET_AND_SET_BOOL ( Timeout  )
daqdataformats::VERSION_NAMESPACE::RawMicroSliceHeader::IMPLEMENT_SET ( Status  ,
uint32_t   
)
void daqdataformats::VERSION_NAMESPACE::RawMicroSliceHeader::init ( )

Set version in the buffer

Definition at line 41 of file RawMicroSliceHeaderV0.cpp.

References samweb_client.client::_version, initSoft(), and setVersion().

Referenced by demo.App::__init__(), testem0.App::__init__(), Lesson1.App::__init__(), and ExN03.App::__init__().

42 {
43  initSoft();
44 
45  /// Set version in the buffer
47 }
void initSoft()
initing without setting the version field
daqdataformats::VERSION_NAMESPACE::RawMicroSliceHeader::INIT_FIRST_GET_AND_SET ( Status  ,
uint32_t   
)
protected
void daqdataformats::VERSION_NAMESPACE::RawMicroSliceHeader::initSoft ( )

initing without setting the version field

Definition at line 50 of file RawMicroSliceHeaderV0.cpp.

References MECModelEnuComparisons::i, RAWBUFF32, resetByteCount(), and sizeofdata().

Referenced by init().

void daqdataformats::VERSION_NAMESPACE::RawMicroSliceHeader::print ( std::ostream &  os = std::cout) const
void daqdataformats::VERSION_NAMESPACE::RawMicroSliceHeader::print ( std::ostream &  os = std::cout) const

Just in case

Definition at line 94 of file RawMicroSliceHeaderV0.cpp.

References EXECUTE_FUNCTION, and novadaq::HexUtils::format().

95 {
96 
97  os<<boost::format("MicroSlice Header: Version=%d DP=%d SIM=%d Extra=%d Timeout=%d, LBC=%d\n")
98  % getVersion()
99  % getDataPresent()
100  % getMonteCarloFlag()
101  % EXECUTE_FUNCTION(getExtra)()
102  % getTimeout()
103  % getByteCount()
104  ;
105 
106  printBuffer(os);
107 
108  //os<<"RAW(binary):";
109  //printWord(0,true, os);
110  //os<<std::endl;
111 }// end of print1
#define EXECUTE_FUNCTION(FULLFUNCTIONNAME)
Execute and return the delegate.
Definition: Macros.h:54
std::string format(const int32_t &value, const int &ndigits=8)
Definition: HexUtils.cpp:14
void* daqdataformats::VERSION_NAMESPACE::RawMicroSliceHeader::readData ( const void pointer)
inline
bool daqdataformats::VERSION_NAMESPACE::RawMicroSliceHeader::resetByteCount ( )

Definition at line 67 of file RawMicroSliceHeaderV0.cpp.

References daqdataformats::RAWTIMINGMARKER_SIZE.

Referenced by initSoft().

68 {
69  setByteCount(sizeof(uint32_t) * RAWTIMINGMARKER_SIZE);
70  return setDataPresent(false);
71 }
static const uint32_t RAWTIMINGMARKER_SIZE
bool daqdataformats::VERSION_NAMESPACE::RawMicroSliceHeader::setVersion ( const version_t  val)
virtual
uint32_t daqdataformats::VERSION_NAMESPACE::RawMicroSliceHeader::sizeofdata ( ) const
inline

Definition at line 68 of file RawMicroSliceHeaderV0.h.

References daqdataformats::RAWMICROSLICEHEADER_SIZE.

Referenced by getMicroSliceSize(), and initSoft().

68 { return RAWMICROSLICEHEADER_SIZE;}
static const uint32_t RAWMICROSLICEHEADER_SIZE

The documentation for this class was generated from the following files: