Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 77586
b: "refs/heads/CMSSW_7_1_X"
c: ca5e91d
h: "refs/heads/CMSSW_7_1_X"
v: v3
  • Loading branch information
Vincenzo Innocente committed Nov 10, 2009
1 parent cb20cf4 commit 5d573f2
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
---
refs/heads/gh-pages: 09c786f70121f131b3715aaf3464996502bbeb7e
"refs/heads/CMSSW_7_1_X": 27e8094bd567893b7791372f87094a28b2447aab
"refs/heads/CMSSW_7_1_X": ca5e91dd2740a396949ecb5d41c029382afa1a14
2 changes: 2 additions & 0 deletions trunk/CondFormats/Calibration/src/classes.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,7 @@ namespace {
cond::DataWrapper<BlobPedestals> d4;
pool::PolyPtr<CalibHistograms> p5;
cond::DataWrapper<CalibHistograms> d5;
pool::PolyPtr<BitArray<9> > p6;
cond::DataWrapper<BitArray<9> > d6;
};
}
32 changes: 32 additions & 0 deletions trunk/CondFormats/Common/test/runAllPayloadsTest
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# tests all classes in a packages

cmsenv
cd $CMSSW_BASE/src
mkdir -p PayloadTest/PayloadTest/test
cd PayloadTest/PayloadTest/test
# cp $ CMSSW_RELEASE_BASE/src/CondFormats/Common/test/testPayloadIO.cc .
cp $CMSSW_BASE/src/CondFormats/Common/test/testPayloadIO.cc .



set pack=$CMSSW_BASE/src/CondFormats/$1
echo "testing package $pack"

foreach class (grep "class_version" $pack/src/classes_def.xml | sed 's/[^"]*"//' | sed 's/".*//')
set cname=`echo "$class" | sed 's/[<,:, ,>]/_/g'`
echo "#define ALLCLASSES" > ${cname}_test.cc
cat testPayloadIO.cc >> ${cname}_test.cc
sed -i "s/THECLASS/$class/g" ${cname}_test.cc
sed -i "s/THEPACKAGE/$1/g" ${cname}_test.cc
echo "<bin file=${cname}_test.cc name=CondPayload_${cname}_testIO>" > bfile
echo "<use name=CondFormats/$1>" >> bfile
echo "<use name=CondCore/DBCommon>" >> bfile
echo "</bin>" >> bfile
mv bfile BuildFile
scramv1 b
echo "run CondPayload_${cname}_testIO"
$CMSSW_BASE/test/$SCRAM_ARCH/CondPayload_${cname}_testIO
pool_list_object_relational_mapping -c sqlite_file:test.db
pool_retrieve_object_relational_mapping -c sqlite_file:test.db -n "$class" -d CondFormats$2
cat mapping.xml
end
2 changes: 2 additions & 0 deletions trunk/CondFormats/Common/test/runPayloadTest
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
# i..e CMSSW_RELEASE_BASE is not empty
# at the moment it is the opposite: assumes /CondFormats/Common be in CMSSW_BASE
#usage class package header
#grep "class_version" src/classes_def.xml | sed 's/[^"]*"//' | sed 's/".*//'


cmsenv
cd $CMSSW_BASE/src
Expand Down
6 changes: 5 additions & 1 deletion trunk/CondFormats/Common/test/testPayloadIO.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,12 @@
#include <vector>



#ifdef ALLCLASSES
#include "CondFormats/THEPACKAGE/src/classes.h
#else
#include "CondFormats/THEPACKAGE/interface/THEHEADER.h"
#endif
typedef THECLASS Payload;
typedef cond::DataWrapper<Payload> SimplePtr;
Expand Down

0 comments on commit 5d573f2

Please sign in to comment.