Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:53:21

0001 /**
0002    \file
0003    test file for FEDRawData library
0004 
0005    \author Stefano ARGIRO
0006    \date 28 Jun 2005
0007 */
0008 
0009 #include <cppunit/extensions/HelperMacros.h>
0010 #include "DataFormats/FEDRawData/interface/FEDNumbering.h"
0011 
0012 class testFEDNumbering : public CppUnit::TestFixture {
0013   CPPUNIT_TEST_SUITE(testFEDNumbering);
0014 
0015   CPPUNIT_TEST(test_inRange);
0016 
0017   CPPUNIT_TEST_SUITE_END();
0018 
0019 public:
0020   void setUp() {}
0021   void tearDown() {}
0022   void test_inRange();
0023   void test_fromDet();
0024 };
0025 
0026 ///registration of the test so that the runner can find it
0027 CPPUNIT_TEST_SUITE_REGISTRATION(testFEDNumbering);
0028 
0029 void testFEDNumbering::test_inRange() {
0030   int i = 0;
0031   for (i = FEDNumbering::MINSiPixelFEDID; i <= FEDNumbering::MAXSiPixelFEDID; i++) {
0032     CPPUNIT_ASSERT(FEDNumbering::inRange(i));
0033   }
0034   for (i = FEDNumbering::MAXSiPixelFEDID + 1; i <= FEDNumbering::MINSiStripFEDID - 1; i++) {
0035     CPPUNIT_ASSERT(not FEDNumbering::inRange(i));
0036   }
0037   for (i = FEDNumbering::MINSiStripFEDID; i <= FEDNumbering::MAXSiStripFEDID; i++) {
0038     CPPUNIT_ASSERT(FEDNumbering::inRange(i));
0039   }
0040   for (i = FEDNumbering::MINPreShowerFEDID; i <= FEDNumbering::MAXPreShowerFEDID; i++) {
0041     CPPUNIT_ASSERT(FEDNumbering::inRange(i));
0042   }
0043   for (i = FEDNumbering::MINECALFEDID; i <= FEDNumbering::MAXECALFEDID; i++) {
0044     CPPUNIT_ASSERT(FEDNumbering::inRange(i));
0045   }
0046   for (i = FEDNumbering::MINCASTORFEDID; i <= FEDNumbering::MAXCASTORFEDID; i++) {
0047     CPPUNIT_ASSERT(FEDNumbering::inRange(i));
0048   }
0049   for (i = FEDNumbering::MINHCALFEDID; i <= FEDNumbering::MAXHCALFEDID; i++) {
0050     CPPUNIT_ASSERT(FEDNumbering::inRange(i));
0051   }
0052   for (i = FEDNumbering::MINLUMISCALERSFEDID; i <= FEDNumbering::MAXLUMISCALERSFEDID; i++) {
0053     CPPUNIT_ASSERT(FEDNumbering::inRange(i));
0054   }
0055   for (i = FEDNumbering::MINCSCFEDID; i <= FEDNumbering::MAXCSCFEDID; i++) {
0056     CPPUNIT_ASSERT(FEDNumbering::inRange(i));
0057   }
0058   for (i = FEDNumbering::MINCSCTFFEDID; i <= FEDNumbering::MAXCSCTFFEDID; i++) {
0059     CPPUNIT_ASSERT(FEDNumbering::inRange(i));
0060   }
0061   for (i = FEDNumbering::MINDTFEDID; i <= FEDNumbering::MAXDTFEDID; i++) {
0062     CPPUNIT_ASSERT(FEDNumbering::inRange(i));
0063   }
0064   for (i = FEDNumbering::MINDTTFFEDID; i <= FEDNumbering::MAXDTTFFEDID; i++) {
0065     CPPUNIT_ASSERT(FEDNumbering::inRange(i));
0066   }
0067   for (i = FEDNumbering::MINRPCFEDID; i <= FEDNumbering::MAXRPCFEDID; i++) {
0068     CPPUNIT_ASSERT(FEDNumbering::inRange(i));
0069   }
0070   for (i = FEDNumbering::MINTriggerGTPFEDID; i <= FEDNumbering::MAXTriggerGTPFEDID; i++) {
0071     CPPUNIT_ASSERT(FEDNumbering::inRange(i));
0072   }
0073   for (i = FEDNumbering::MINTriggerEGTPFEDID; i <= FEDNumbering::MAXTriggerEGTPFEDID; i++) {
0074     CPPUNIT_ASSERT(FEDNumbering::inRange(i));
0075   }
0076   for (i = FEDNumbering::MINTriggerGCTFEDID; i <= FEDNumbering::MAXTriggerGCTFEDID; i++) {
0077     CPPUNIT_ASSERT(FEDNumbering::inRange(i));
0078   }
0079   for (i = FEDNumbering::MINTriggerLTCFEDID; i <= FEDNumbering::MAXTriggerLTCFEDID; i++) {
0080     CPPUNIT_ASSERT(FEDNumbering::inRange(i));
0081   }
0082   for (i = FEDNumbering::MINTriggerLTCmtccFEDID; i <= FEDNumbering::MAXTriggerLTCmtccFEDID; i++) {
0083     CPPUNIT_ASSERT(FEDNumbering::inRange(i));
0084   }
0085   for (i = FEDNumbering::MINCSCDDUFEDID; i <= FEDNumbering::MAXCSCDDUFEDID; i++) {
0086     CPPUNIT_ASSERT(FEDNumbering::inRange(i));
0087   }
0088   for (i = FEDNumbering::MINCSCContingencyFEDID; i <= FEDNumbering::MAXCSCContingencyFEDID; i++) {
0089     CPPUNIT_ASSERT(FEDNumbering::inRange(i));
0090   }
0091   for (i = FEDNumbering::MINCSCTFSPFEDID; i <= FEDNumbering::MAXCSCTFSPFEDID; i++) {
0092     CPPUNIT_ASSERT(FEDNumbering::inRange(i));
0093   }
0094   for (i = FEDNumbering::MINDAQeFEDFEDID; i <= FEDNumbering::MAXDAQeFEDFEDID; i++) {
0095     CPPUNIT_ASSERT(FEDNumbering::inRange(i));
0096   }
0097   for (i = FEDNumbering::MINDAQmFEDFEDID; i <= FEDNumbering::MAXDAQmFEDFEDID; i++) {
0098     CPPUNIT_ASSERT(FEDNumbering::inRange(i));
0099   }
0100   for (i = FEDNumbering::MINTCDSuTCAFEDID; i <= FEDNumbering::MAXTCDSuTCAFEDID; i++) {
0101     CPPUNIT_ASSERT(FEDNumbering::inRange(i));
0102   }
0103   for (i = FEDNumbering::MINHCALuTCAFEDID; i <= FEDNumbering::MAXHCALuTCAFEDID; i++) {
0104     CPPUNIT_ASSERT(FEDNumbering::inRange(i));
0105   }
0106   for (i = FEDNumbering::MINSiPixeluTCAFEDID; i <= FEDNumbering::MAXSiPixeluTCAFEDID; i++) {
0107     CPPUNIT_ASSERT(FEDNumbering::inRange(i));
0108   }
0109   for (i = FEDNumbering::MINDTUROSFEDID; i <= FEDNumbering::MAXDTUROSFEDID; i++) {
0110     CPPUNIT_ASSERT(FEDNumbering::inRange(i));
0111   }
0112   for (i = FEDNumbering::MINTriggerUpgradeFEDID; i <= FEDNumbering::MAXTriggerUpgradeFEDID; i++) {
0113     CPPUNIT_ASSERT(FEDNumbering::inRange(i));
0114   }
0115 }