<commit_before>#!/bin/sh
# $Id$

CURDIR=`pwd`
OUTDIR=test_out

rm -fr $OUTDIR
mkdir $OUTDIR
cp $ALICE_ROOT/MUON/.rootrc $ALICE_ROOT/MUON/rootlogon.C $OUTDIR
cd $OUTDIR

FULLPATH="$CURDIR/$OUTDIR"
NEVENTS=100
SEED=1234567

CDBDIRECTORY="$ALICE_ROOT/MUON/CDB/Default";
CDB="local://$CDBDIRECTORY";

if [ ! -d $CDBDIRECTORY"/MUON" ]; then

echo "Generating Condition Database in directory $CDBDIRECTORY. This may take a while, so please be patient..."

aliroot -b >& testGenerateCalibrations.out << EOF
.L $ALICE_ROOT/MUON/MUONCDB.C++
gRandom->SetSeed($SEED);
generateCalibrations("$CDB",true);
.q
EOF

else

echo "Condition Database found in directory $CDBDIRECTORY. Will use it if needed."

fi

echo "Running simulation  ..."

aliroot -b  >& testSim.out << EOF 
gRandom->SetSeed($SEED);
AliCDBManager::Instance()->SetDefaultStorage("$CDB");
AliSimulation MuonSim("$ALICE_ROOT/MUON/Config.C");
MuonSim.SetWriteRawData("MUON");
MuonSim.Run($NEVENTS)
.q
EOF

echo "Running reconstruction  ..."

aliroot -b >& testReco.out << EOF
gRandom->SetSeed($SEED);
AliCDBManager::Instance()->SetDefaultStorage("$CDB");
AliReconstruction MuonRec("galice.root")
MuonRec.SetInput("$FULLPATH/");
MuonRec.SetRunTracking("")
MuonRec.SetRunVertexFinder(kFALSE)
MuonRec.SetRunLocalReconstruction("MUON")
MuonRec.SetFillESD("MUON")
MuonRec.Run();
.q
EOF

echo "Running Trigger efficiency  ..."
aliroot -b >& testTriggerResults.out << EOF
.L $ALICE_ROOT/MUON/MUONTriggerEfficiency.C++
MUONTriggerEfficiency();
.q
EOF

echo "Running efficiency  ..."

aliroot -b >& testResults.out << EOF
.L $ALICE_ROOT/MUON/MUONefficiency.C++
// no argument assumes Upsilon but MUONefficiency(443) works on Jpsi
MUONefficiency();
.q
EOF

echo "Running dumps ..."

if [ "$NEVENTS" -le 20 ]; then

aliroot -b > /dev/null << EOF
.L $ALICE_ROOT/MUON/MUONCheck.C++
MUONdigits(); > check.digits
MUONrecpoints(); > check.recpoints
MUONrectracks(); > check.rectracks
MUONrectrigger(); > check.rectrigger
EOF

fi

echo "Finished"  
echo "... see results in test_out"

cd $CURDIR<commit_msg>Let the CDB storage alone. It is now handled by AliSimulation and AliReconstruction (Laurent)<commit_after>#!/bin/sh
# $Id$

CURDIR=`pwd`
OUTDIR=test_out

rm -fr $OUTDIR
mkdir $OUTDIR
cp $ALICE_ROOT/MUON/.rootrc $ALICE_ROOT/MUON/rootlogon.C $OUTDIR
cd $OUTDIR

FULLPATH="$CURDIR/$OUTDIR"
NEVENTS=100
SEED=1234567

echo "Running simulation  ..."

aliroot -b  >& testSim.out << EOF 
gRandom->SetSeed($SEED);
AliSimulation MuonSim("$ALICE_ROOT/MUON/Config.C");
MuonSim.SetWriteRawData("MUON");
MuonSim.Run($NEVENTS)
.q
EOF

echo "Running reconstruction  ..."

aliroot -b >& testReco.out << EOF
gRandom->SetSeed($SEED);
AliReconstruction MuonRec("galice.root")
MuonRec.SetInput("$FULLPATH/");
MuonRec.SetRunTracking("")
MuonRec.SetRunVertexFinder(kFALSE)
MuonRec.SetRunLocalReconstruction("MUON")
MuonRec.SetFillESD("MUON")
MuonRec.Run();
.q
EOF

echo "Running Trigger efficiency  ..."
aliroot -b >& testTriggerResults.out << EOF
.L $ALICE_ROOT/MUON/MUONTriggerEfficiency.C++
MUONTriggerEfficiency();
.q
EOF

echo "Running efficiency  ..."

aliroot -b >& testResults.out << EOF
.L $ALICE_ROOT/MUON/MUONefficiency.C++
// no argument assumes Upsilon but MUONefficiency(443) works on Jpsi
MUONefficiency();
.q
EOF

echo "Running dumps ..."

if [ "$NEVENTS" -le 20 ]; then

aliroot -b << EOF
.L $ALICE_ROOT/MUON/MUONCheck.C++
MUONdigits(); > check.digits
MUONrecpoints(); > check.recpoints
MUONrectracks(); > check.rectracks
MUONrectrigger(); > check.rectrigger
EOF

fi

echo "Finished"  
echo "... see results in test_out"

cd $CURDIR
{'fraction_non_alphanumeric': 0.1517106001121705, 'fraction_numerical': 0.008412787436904094, 'mean_word_length': 5.192708333333333, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 28, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7457253', 'n_tokens_mistral': 1452, 'n_tokens_neox': 1364, 'n_words': 293}