/* ===================================================================== * The Readout List. This class provides some functionality around * it. This is used in the RCU Firmware V2 to define the order of readout * of the channels of all ALTROs on the FECs connected to an RCU. * On the RCU it is 12bit x 4096. * ===================================================================== */ /* *Author: C. Lippmann, Christian.Lippmann@cern.ch */ #ifndef READOUTLIST_H #define READOUTLIST_H #include "Acl.h" #include "../Mapping/Mapping.h" #include #include #include #include "../Logger/Logger.h" #include "../CentralHeaders/TpcException.h" using namespace std; class ReadoutList{ public: ReadoutList(); ~ReadoutList(); void reset(); // Fill ACL only void fillACL(uint32_t branch, uint32_t fec, uint32_t altro, uint32_t channel, bool chOn = true); void fillACL(int32_t hwAddr, bool chOn = true); // Fill Readout List directly. First come, first served void fillFCFS(uint32_t branch, uint32_t fec, uint32_t altro, uint32_t channel, bool chOn = true); void fillFCFS(int32_t hwAddr, bool chOn = true); // Fill Acl and Readout List (First Come First Served). void fill(uint32_t branch, uint32_t fec, uint32_t altro, uint32_t channel, bool chOn = true); void fill(int32_t hwAddr, bool chOn = true); void makeReadoutListFromAclHLT(int32_t rcu); // make readout list, padrow ordered readout void makeReadoutListFromAclHwAdd(); // make readout list, hwadd ordered readout void makeReadoutListFromAclFast(int32_t rcu); // make readout list, padrow ordered, alternating branches void makeReadoutListFromAclV21(int32_t rcu); // make readout list for RCU Fw V 2.1 void finalize(); uint32_t *get(); uint32_t at(uint32_t position); uint32_t size(); Acl *getAcl(); void setDebugLevel(int32_t dbl) { fLogger->setDebugLevel(dbl); }; int32_t getDebugLevel() { return fLogger->getDebugLevel(); }; private: bool addActiveChannelFromACL(int32_t hwAddr); bool addActiveChannelFromACLv21(int32_t hwAddr); vector fListBranchA; // The Readout List for RCU fw V 2.1, branch A vector fListBranchB; // The Readout List for RCU fw V 2.1, branch B vector fReadoutList; // The Readout List Acl fACL; // Active channel List Mapping fPm; // Pad Mapping Logger *fLogger; // Logging class uint32_t fVersion; // RCU FW V 2.1 uses two halves of the ROLM for the two branches uint32_t fMaxSize; // Size of the ROLM }; #endif // READOUTLIST_H