![]() |
|
|||
File indexing completed on 2025-08-03 08:20:52
0001 #ifndef __PACKET_ID4SCALER_H__ 0002 #define __PACKET_ID4SCALER_H__ 0003 0004 0005 #include "packet_w124.h" 0006 0007 /** 0008 This is the packet which deals with data in ID4SCALER format. 0009 It inherits from Packet\_w4 because the data are 32bit entities. 0010 0011 0012 Since there is a variety of data contained in that packet, the main interaction with this packet 0013 is through the iValue (channel,"STRING") interface. 0014 0015 The packet contains a num,ber of trigger masks which were valid for this partition. 0016 0017 0018 iValue(0,"NUMBERMASKS") returns the number of masks 0019 iValue(i,"TRIGGERMASK") returns the triggermask i, where 0 <= i < iValue(0,"NUMBERMASKS") 0020 0021 Similarly, 0022 0023 iValue(0,"NUMBERSCALERS") returns the number of scalers valid for this partition. 0024 0025 Then you have 3 sets of scalers. 0026 0027 iValue(i,"RAWSCALERS") 0028 iValue(i,"LIFESCALERS") 0029 iValue(i,"SCALEDSCALERS") 0030 0031 where 0 <= i < iValue(0,"NUMBERSCALERS") 0032 0033 which return the respective scaler values. 0034 0035 Finally, a more complicated one is the iValue(i,"TIMESTRING") interface. Similar to the IDCSTR 0036 packet. It returns a character string losely modeled after the standard UNIX getc(FILE* fp) interface. 0037 0038 When the string is ended, it returns EOF, so if you are familiar with the construct 0039 0040 int c; 0041 while ( ( c = getc(fp) ) !=EOF ) *str++ = c; 0042 0043 you'll see the similarity with 0044 0045 int i = 0; 0046 while ( ( c = p->iValue(i++,"TIMESTRING") ) != EOF ) *str++ = c; 0047 0048 (p is the pointer to this packet) 0049 0050 In the end, you will have a regular 0-terminated C character string. 0051 0052 */ 0053 0054 0055 0056 #ifndef __CINT__ 0057 class WINDOWSEXPORT Packet_id4scaler : public Packet_w4 { 0058 #else 0059 class Packet_id4scaler : public Packet_w4 { 0060 #endif 0061 0062 public: 0063 Packet_id4scaler(PACKET_ptr); 0064 int iValue(const int channel,const char *what); 0065 long long lValue(const int channel, const char *what); 0066 0067 virtual void dump ( OSTREAM& ) ; 0068 0069 protected: 0070 virtual int *decode (int *); 0071 }; 0072 0073 #endif /* __PACKET_ID4SCALER_H__ */ 0074 0075 0076 0077 0078
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
![]() ![]() |